package com.liuceng.mps.utils;

import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;

/**
 * Created by liyuhang on 2016-22-4.
 */
public class ConvertUtils {

  public static LocalDate date2LocalDate(Date date) {
    return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
  }

  public static Date localDate2Date(LocalDate localDate) {
    return Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
  }

}
